package edu.spec.student.model.mental;

import edu.spec.student.model.Student;

import javax.persistence.*;

/**
 * Created by MadFrog on 2017/6/20.
 */
@Entity
@Table(name = "t_student_rubric")
public class StudentRubric {
    private int id;
    private Student student;
    private Rubric rubric;
    private int asw;
    private Integer score;

    public StudentRubric(Student student, Rubric rubric, Integer asw, Integer score) {
        this.student = student;
        this.rubric = rubric;
        this.asw = asw;
        this.score = score;
    }

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @ManyToOne
    @JoinColumn(name = "student_id")
    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    @ManyToOne
    @JoinColumn(name = "rubric_id")
    public Rubric getRubric() {
        return rubric;
    }

    public void setRubric(Rubric rubric) {
        this.rubric = rubric;
    }

    public int getAsw() {
        return asw;
    }

    public void setAsw(int asw) {
        this.asw = asw;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }
}
